4225b2e93f697897354dadddb8b699bf664f2e94,java/java-impl/src/com/intellij/refactoring/extractMethod/ExtractMethodProcessor.java,ExtractMethodProcessor,doRefactoring,#,555
Before Change
LogicalPosition pos1 = new LogicalPosition(line, col);
myEditor.getCaretModel().moveToLogicalPosition(pos1);
int offset = myMethodCall.getMethodExpression().getTextRange().getStartOffset();
myEditor.getCaretModel().moveToOffset(offset);
myEditor.getScrollingModel().scrollToCaret(ScrollType.RELATIVE);
myEditor.getSelectionModel().removeSelection();
}
private void doExtract() throws IncorrectOperationException {
After Change
ApplicationManager.getApplication().runWriteAction(extract);
}
if (myEditor != null) {
myEditor.getCaretModel().moveToLogicalPosition(pos1);
int offset = myMethodCall.getMethodExpression().getTextRange().getStartOffset();
myEditor.getCaretModel().moveToOffset(offset);
myEditor.getScrollingModel().scrollToCaret(ScrollType.RELATIVE);
myEditor.getSelectionModel().removeSelection();
}
}